package com.guaoran.interview.spring.source.circular;

import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;

/**
 * @author : 孤傲然
 * @description : 循环依赖
 * @date :2024/3/1 19:58
 */
public class CircularReferenceSourceDemoTest {
    public static void main(String[] args) {
        AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext();
        applicationContext.register(CircularReferenceOneService.class);
        applicationContext.register(CircularReferenceTwoService.class);
        applicationContext.refresh();
        CircularReferenceOneService bean = applicationContext.getBean(CircularReferenceOneService.class);
        System.out.println(bean);
    }
}
